package services;

import frame.service.anno.MiayAction;
import frame.service.anno.MiayService;
import frame.service.context.ServiceContext;
import frame.service.standard.Constants;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 采用验证开放服务确保服务配置准确
 * curl -X POST -d "{\"name\":\"guojikai\"}" http://127.0.0.1:9088/miay/open/test/HelloService/say-1.0.0
 * */
@MiayService(module = "test", service = "HelloService", safeMode = Constants.SAFE_MODE_OPEN)
public class OpenHelloService {
    Logger logger = LoggerFactory.getLogger(OpenHelloService.class);

    @MiayAction(comment = "服务状态验证接口")
    public void say(ServiceContext serviceContext){
        logger.info("Access was successful.");
    }
}
